package kr.hkit.powerjava.chapter26.dto;

public class Department implements Comparable<Department>{
	private int deptno;
	private String deptname;
	private int floor;
	//생성자
	public Department(){}
	public Department(int deptno, String deptname, int floor) {
		super();
		this.deptno = deptno;
		this.deptname = deptname;
		this.floor = floor;
	}

	@Override
	public String toString() {
		return String.format("%3s\t%5s\t%2s",
				deptno, deptname, floor);
	}

	public Department(int deptno, String deptname) {
		super();
		this.deptno = deptno;
		this.deptname = deptname;
	}

	public Department(int deptno) {
		super();
		this.deptno = deptno;
	}

	public int getDeptno() {
		return deptno;
	}

	public void setDeptno(int deptno) {
		this.deptno = deptno;
	}

	public String getDeptname() {
		return deptname;
	}

	public void setDeptname(String deptname) {
		this.deptname = deptname;
	}

	public int getFloor() {
		return floor;
	}

	public void setFloor(int floor) {
		this.floor = floor;
	}
	@Override
	public int compareTo(Department o) {
		// TODO Auto-generated method stub
		return deptno-o.deptno;
	}
	
}
